package yun.web.springmvc.paramcheck;

public class ParamCheckResult<R> {
    public Boolean flag;

    public R r;

    public Boolean getFlag() {
        return flag;
    }

    public ParamCheckResult<R> setFlag(Boolean flag) {
        this.flag = flag;
        return this;
    }

    public R getR() {
        return r;
    }

    public ParamCheckResult<R> setR(R r) {
        if (r instanceof String) throw new ParamCheckException("ParamCheckResult#R 不能为String类型");
        this.r = r;
        return this;
    }


}
